package com.mall.dubbo.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.model.domain.PmsProductAttribute;
import org.apache.ibatis.annotations.Select;

public interface PmsProductAttributeMapper extends BaseMapper<PmsProductAttribute> {


    /**
     * 查询属性数量
     * @param attributeCategoryId
     * @return
     */
    @Select("SELECT count(*) FROM pms_product_attribute WHERE type = '0' and product_attribute_category_id =#{attributeCategoryId}")
    public Integer selectByIdAttributeCountNum(Long attributeCategoryId);

    /**
     * 查询参数数量
     * @param attributeCategoryId
     * @return
     */
    @Select("SELECT count(*) FROM pms_product_attribute WHERE type = '1' and product_attribute_category_id =#{attributeCategoryId}")
    public Integer selectByIdParamCountNum(Long attributeCategoryId);
}
